With rapid development of electronic technologies, upgrading of user terminals accelerates. For example, commonly used user terminals such as mobile phones, tablet computers, wearable devices have become an important part of people's daily life. Most user terminals need to be charged by using a power supply device. In an example of a mobile phone, one Universal Serial Bus (Universal Serial Bus, USB) port, on a charging data cable, that is used to connect to a power source and that matches the mobile phone is connected to a power source charger or a computer, and the other USB port on the charging data cable is connected to a charging port of the mobile phone, to charge the mobile phone.
In an actual application, in a charging process of the user terminal, a leakage current at the charging port, an extremely high current, and an extremely high voltage may cause damage to the mobile phone to some extent. In an existing technical solution, a protection circuit designed inside the user terminal can protect the user terminal from the extremely high current or the extremely high voltage. However, in a case of a short circuit at the charging port, before flowing into the protection circuit inside the user terminal, some currents flowing through the charging port are short-circuited to ground. In this case, if a current detected by the protection circuit does not exceed a preset current threshold, the protection circuit considers that charging is normal, and the user terminal remains in a charging state. This causes the charging port to be burned due to the extremely high current, and reduces charging security of the user terminal.